<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动的元素具有行内块元素特点</title>
    <style>
        span,
        div {
            width: 200px;
            height: 100px;
            background-color: pink;
            float: left;
        }
        /* 如果行内元素有了浮动，则不需要转换块级，行内元素直接就可以给高度宽度 */
        p {
            float: right;
            height: 200px;
            background-color: purple;
        }
    </style>
</head>
<body>
    <span>1</span>
    <span>2</span>


    <div> div </div>
    <p> p ppppppppppppppppppp</p>
</body>
</html>